package com.iqismart.shorturl.repository;

import com.iqismart.shorturl.model.EntityLog;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

/**
 * @Description
 * @Auther sty
 * @createTime 2019-10-14 11:20
 */
@Repository
public interface LogRepository extends BaseRepository<EntityLog>{
    @Query("select count(distinct ip) from EntityLog where urlId=?1")
    Long countIP(Long urlId);

    @Query("select count(id) from EntityLog where urlId=?1")
    Long countPV(Long urlId);
}
